<?php 
if (count($data) < 30) {
    ?>
<script>
    jQuery(document).ready(function() {
        jQuery('.no_more').hide();
        jQuery('.next_link').hide();
        jQuery('.last_link').hide();
        
    })
</script>
<?php 
if (count($data) <= 10) {
    
    ?>
    <script>
    jQuery(document).ready(function() {
        jQuery('div[class^=alt_page_navigation]').hide();
    })
    </script>
    
<?php

    }
}
 ?>
<div class="right_sort" id="jqsort">
        <div class="top"></div>
        <div class="center">
              <div class="btns"> <div>
                <h2 style="padding-left: 10px;">Tags: <?php echo $data[0]->tags ?></h2> 
              </div></div>
              <div class="sort_pager">
	                
          </div>
    <div id="ilist" class="ilist topnew">
        <div class="alt_page_navigation"></div>
         <div class="listsort topnew" id="topnew">
            
 <?php 
 
 foreach ($data as $row) {

    $image = imageStyle($row->image, 120, 120);
    $url = url('/chi-tiet/'.$row->alias);
    $title = $row->title;
    $urlM = url('main/'.$row->malias);
    $urlC = url('danh-muc/'.$row->calias);
    $mtitle = $row->mtitle;
    $ctitle = $row->ctitle;
    $auth = $row->createdby == '' ? 'None' : $row->createdby;
    $flag = iUrlFile($row->flag);
  ?>         
          
            <div class="resultblock list-item list-item-topnew">
               <h2 class="title"> <a href="<?php echo $url ?>"><?php echo $title ?></a></h2>
                <div class="imgthumb"> <img src="<?php echo $image ?> " /></div>
                <p> 
                    <span class="numpage"><?php echo $row->numpage; ?></span> Trang  
                    <span class="auth" style="margin-left: 10px;"> Ngôn ngữ: <img src="<?php echo $flag ?>" /> </span>  
                    <span class="date" style="margin-left: 10px;" ><?php echo date('d/m/Y', $row->created) ?></span>  
                </p>
                <p> Thuộc thư mục:  <a href="<?php echo $urlM ?>"><?php echo $mtitle ?></a> > <a href="<?php echo $urlC ?>"><?php echo $ctitle ?> </a> </p>
                <p style="margin-top:40px;">
                    <span>Xem <span class="view"><?php echo $row->hit ?></span></span>  | 
                    <span>Lượt tải <span class="download"><?php echo $row->download ?></span></span> | 
                    <span>Bình luận <span class="download"><?php echo $row->numComment ?></span></span>
                </p>
                
                 
            
               
          </div>
          
 <?php 
 }
  ?>         
          </div>
          </div>

            </div>
        <div class="bottom"></div>
      </div>
      
